from celery.result import AsyncResult

from celeru_task import app


a_rt = AsyncResult(id="62dfa984-b3d5-4b4e-be6e-dd829df4c439", app=app)
if a_rt.successful():
    print('异步任务执行成功', a_rt.get())
elif a_rt.failed():
    print("sssssssss")
elif a_rt.state == "PENDING":
    print('异步任务执行PENDING')
elif a_rt.state == "STARTED":
    print('异步任务执行STARTED')
elif a_rt.state == "RETRY":
    print('异步任务执行RETRY')
elif a_rt.state == "FAILURE":
    print('异步任务执行FAILURE')
else:
    print("任务异常")